package org.eclipsedevx.testing.ui;

import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipsedevx.testing.model.TestNode;

public class TestLabelProvider extends LabelProvider {

	public TestLabelProvider() {
		
	}

	@Override
	public Image getImage(Object element) {
		if (element instanceof TestNode) {
			return ((TestNode)element).getImage();
		} else {
			return super.getImage(element);
		}
	}

	@Override
	public String getText(Object element) {
		if (element instanceof TestNode) {
			return ((TestNode)element).getLabel();
		} else {
			return super.getText(element);
		}
	}
	
}
